{% extends "template/layout.html" %} {% block content %}
<style>
    .admin_default {
        margin: 20px;
    }

    .layui-body {
        overflow-y: scroll;
    }

    .backBtn {
        float: right;
    }

    .addFrom {
        margin: 20px 20px 20px 5px;
    }

    .formBtn {
        margin-left: 150px;
        margin-top: 50px;
    }

    .idItem {
        display: none;
    }

    .noticeAdd {
        width: 230px;
        height: 30px;
    }

    .addForm {
        margin-top: 30px;
        width: 650px;
        margin: auto;
    }

    #demo1 {
        width: 200px;
        height: 200px;
    }

   

    .noticeText {
        display: none;

    }
</style>

<div class="panel admin_default">
    <div class="demoTable">
        <div class="layui-inline  noticeAdd">
        </div>
        <button class="layui-btn  backBtn">返回</button>

    </div>
    <div class="addForm">
        <form class="layui-form" action="" lay-filter="detailform">
            <div class="layui-form-item">
                <label class="layui-form-label">员工工号：</label>
                <div class="layui-input-block">
                    <input type="text" name="num" required lay-verify="required" autocomplete="off" placeholder="" class="layui-input"
                        disabled>
                </div>
            </div>
            <div class="layui-form-item">
                    <label class="layui-form-label">员工姓名：</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" required lay-verify="required" autocomplete="off" placeholder="" class="layui-input"
                            disabled>
                    </div>
                </div>
                <div class="layui-form-item">
                        <label class="layui-form-label">联系方式：</label>
                        <div class="layui-input-block">
                            <input type="text" name="phone" required lay-verify="required" autocomplete="off" placeholder="" class="layui-input"
                                disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                            <label class="layui-form-label">所属部门：</label>
                            <div class="layui-input-block">
                                <input type="text" name="departmentName" required lay-verify="required" autocomplete="off" placeholder="" class="layui-input"
                                    disabled>
                            </div>
                        </div>
            <div class="layui-form-item layui-form-text notcieImg">
                <label class="layui-form-label">图：</label>
                <div class="layui-input-block">
                    <div class="layui-upload">

                        <div class="layui-upload-list">
                            <img class="layui-upload-img" id="demo1">
                            <p id="demoText"></p>
                        </div>
                    </div>
                </div>
            </div>
      

            <div class="layui-form-item">

            </div>
        </form>
    </div>


</div>


{% endblock %} {% block footer %}

<script>
    var detailformData = {};
    detailformData.num = `{{employeesDetail.num}}`;
    detailformData.id = `{{employeesDetail.id}}`;
    detailformData.name = `{{employeesDetail.name}}`;
    detailformData.phone = `{{employeesDetail.phone}}`;
    detailformData.departmentName = `{{employeesDetail.departmentName}}`;
    detailformData.url = `{{employeesDetail.url}}`;

    layui.use(['form', 'table', 'laydate', 'upload'], function () {
        var table = layui.table;
        var form = layui.form;
        var upload = layui.upload;

        //返回事件
        $('#demo1').attr('src', detailformData.url);

        form.val('detailform', detailformData)
    
        $(".backBtn").click(function () {
            window.history.go(-1);    
            })
    });
</script>
{% endblock %}